#include "user.h"
#include <stdio.h>

int
get_user_number(const struct user *const u)
{
    return (u->number);
}

const char *
get_user_name(const struct user *const u)
{
    return (u->name);
}

const char *
get_user_telephone(const struct user *const u)
{
    return (u->telephone);
}

const char *
get_user_password(const struct user *const u)
{
    return (u->password);
}

int
get_user_age(const struct user *const u)
{
    return (u->age);
}

int
get_user_gender(const struct user *const u)
{
    return (u->gender);
}

void
set_user_number(struct user *u, int number)
{
    u->number = number;
}

void
set_user_name(struct user *u, const char *name)
{
    snprintf(u->name, sizeof(u->name), "%s", name); 
} 

void
set_user_telephone(struct user *u, const char *telephone)
{
    snprintf(u->telephone, sizeof(u->telephone), "%s", telephone); 
} 

void
set_user_password(struct user *u, const char *password)
{
    snprintf(u->password, sizeof(u->password), "%s", password);
}

void
set_user_age(struct user * u, int age)
{
    u->age = age;
}

void
set_user_gender(struct user * u, int gender)
{
    u->gender = gender;
}

